package demo.kk;


/**
 * @author : feixiang.li
 * @since : 2025-09-16 11:38
 */
public class MySingleton {

    private volatile MySingleton instance;

    private MySingleton() {
    }

    public MySingleton getInstance() {
        if (instance == null) {
            synchronized (MySingleton.class) {
                if (instance == null) {
                    instance = new MySingleton();
                }
            }
        }
        return instance;
    }
}
